; -------------------------------------------------------------
; Include File for the PIC16F688 Based DMX DCSSR
; (c) 2012 Joshua Moyerman

#define		DMX_DC9 1
#define		NOBOARD
; --------- Board Presets --------- 
#if BOARD == DMX_DC9

; Define number of channels used
#define		CHANNELS 9		; Valid options are 1 to 9 inclusive
#define	PROCESSOR	16F688
#define PROG_PORT       PORTA
#define PROG_PIN        3
#define PROG_PULL_DOWN

#define CH1VAR		pinsa
#define CH1PORT		PORTA
#define CH1PIN		5

#define CH2VAR		pinsa
#define CH2PORT		PORTA
#define CH2PIN		4

#define CH3VAR		pinsa
#define CH3PORT		PORTA
#define CH3PIN		0

#define CH4VAR		pinsa
#define CH4PORT		PORTA
#define CH4PIN		1

#define CH5VAR		pinsa
#define CH5PORT		PORTA
#define CH5PIN		2

#define CH6VAR		pinsc
#define CH6PORT		PORTC
#define CH6PIN		0

#define CH7VAR		pinsc
#define CH7PORT		PORTC
#define CH7PIN		1

#define CH8VAR		pinsc
#define CH8PORT		PORTC
#define CH8PIN		2

#define CH9VAR		pinsc
#define CH9PORT		PORTC
#define CH9PIN		3

#define BOARD_TRUE
#endif	; BOARD == CHILLOUTDOCDOC

#ifndef BOARD_TRUE
	error Define a Board Please!
#endif

; --------- Processor Specifics --------- 
#if PROCESSOR == 16F688
#define		BANK0	bcf		STATUS,RP0		; These are used to switch
#define		BANK1	bsf		STATUS,RP0		; back and forth between banks					
#endif

; --------- Don't Modify These Values --------- 
#define DMX_HIGH_BYTE   0x00	; Stores location of high byte in EEPROM
#define DMX_LOW_BYTE    0x01	; Stores location of low byte in EEPROM
#define DMX_STATUS_BYTE 0x02    ; See if has been field programmed before
;  --------- Check Defines ---------
; Check start channel
#define MAX_START_CHANNEL (512 - CHANNELS)

#if (DMX_START_ADDRESS > MAX_START_CHANNEL)
	error - - - - - - - - - - - - - - - - - - - -
	error * DMX START ADDRESS TOO HIGH! *
	error * Must be less than MAX_START_CHANNEL *              
	error - - - - - - - - - - - - - - - - - - - - 
#endif

#if (DMX_START_ADDRESS < 1)
	error - - - - - - - - - - - - - - -
	error * DMX START ADDRESS TOO LOW! *
	error * Must be one or higher *
	error - - - - - - - - - - - - - - -
#endif

; Check Number of Channels
#if (CHANNELS > 9)
	error - - - - - - - - - - - - - - - - - - - -
	error * Channels too high, max of 9 channels *
	error - - - - - - - - - - - - - - - - - - - - 
#endif

#if (CHANNELS < 1)
	error - - - - - - - - - - - - - - - - - - - 
	error * Channels too few, min of 1 channel *
	error - - - - - - - - - - - - - - - - - - - 
#endif
;  --------- End Defines and stuff you should modify ---------